package com.cuitrip.storage.prefrence;

/**
 *设置使用Preferences
 */
public class SettingPreferences extends BasePreferences {

    private static final String PREFERENCE_NAME = "cuitrip_debug";

    private static SettingPreferences instance;

    /**
     * @param keyClass 保存preferenceKey的类，key必须是public static的
     */
    private SettingPreferences(Class keyClass) {
        super(keyClass);
    }

    public static SettingPreferences getInstance() {
        if (instance == null) {
            instance = new SettingPreferences(DebugKeys.class);
        }
        return instance;
    }

    @Override
    protected String getPreferenceName() {
        return PREFERENCE_NAME;
    }

    public class DebugKeys {
        //api环境
        public static final String KEY_API_HOST = "api_host";

        //埋点提示
        public static final String KEY_TRACK_TOAST = "track";
    }
}
